package com.zc.study.designPattern.行为型设计模式.CommandPattern.LogFile;

import java.io.Serializable;

/**
 * 抽象命令类,由于需要将命令对象写入文件,因此它实现了Serializable接口
 */
public abstract class Command implements Serializable {
    protected String name; //命令名称
    protected String args; //命令参数
    protected  ConfigOperator configOperator; //维持对接收者对象的引用

    //声明两个抽象的执行方法 execut()
    public  abstract void excute(String args);
    public  abstract void excute();
    public Command(String name) {
        this.name = name;
    }

    public void setConfigOperator(ConfigOperator configOperator) {
        this.configOperator = configOperator;
    }

    public String getName() {

        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
